home *** CD-ROM | disk | FTP | other *** search
/ CICA 1995 August / CICA - The Ultimate Collection of Shareware for Windows (Disc 2) (August 1995).iso / disc2 / demo / pwrtcp11.exe / POWERTCP.HP_ / POWERTCP.bin
Text File  |  1995-02-05  |  2KB  |  55 lines

  1. //***************************************************************************
  2. //
  3. //  Module: PowerTcp.hpp
  4. //
  5. //  Purpose:
  6. //     Declares CPowerTcp class
  7. //             
  8. //***************************************************************************
  9. //
  10. //  Written by Dart Communication Application Programming Group.
  11. //  Copyright (c) 1994 Dart Communications.  All Rights Reserved.
  12. //
  13. //***************************************************************************
  14.  
  15. // PowerTCP.h should be included before this file
  16.  
  17. // typedefs used here...
  18.  
  19. // Classes used...
  20. class CTcp;
  21.  
  22. //
  23. // CPowerTcp
  24. // Defines the functions required to provide a TCP stream to parent
  25. //
  26. class CPowerTcp
  27. {
  28. friend class CTcp;
  29. private:
  30.     CTcp &Tcp; // WINSOCK calls, etc here 
  31. protected:
  32.     // assessor functions from Tcp follow...
  33.     virtual void ConnectEvent (LPCSTR RemoteDotAddr, WORD RemotePort, 
  34.         LPCSTR LocalDotAddr, WORD LocalPort, LPCSTR LocalName); 
  35.     virtual void RecvEvent (LPVOID Data, size_t ByteCnt);
  36.     virtual void SendEvent (DWORD DataTag);
  37.     virtual void ListenEvent (LPCSTR LocalDotAddr, WORD LocalPort, LPCSTR LocalName);
  38.     virtual void AcceptEvent (void);
  39.       virtual void ExceptionEvent(PT_EXCEPTION ErrorCode, LPCSTR ErrorDesc)=0;
  40.     virtual PT_TYPE GetType (void);
  41. public:
  42.     BOOL Connect (LPCSTR OemLicense, PT_FLAGS Flags, LPCSTR RemoteHost, WORD RemotePort, 
  43.         LPCSTR LocalDotAddr, WORD LocalPort);
  44.     BOOL Accept (LPCSTR Key, PT_FLAGS Flags, CPowerTcp &Daemon);
  45.     BOOL Send (LPVOID Data, size_t ByteCnt, BOOL Urgent, DWORD DataTag);
  46.     BOOL Recv (size_t MaxByteCnt);
  47.     BOOL Listen (LPCSTR OemLicense, PT_FLAGS Flags, LPCSTR LocalDotAddr, WORD LocalPort, WORD Timeout=0);
  48.     BOOL Close (BOOL Abort);
  49.     PT_STATE State (void);
  50.     CPowerTcp (HINSTANCE);
  51.     ~CPowerTcp (void);
  52.     int operator = (CPowerTcp &);
  53. };
  54.  
  55.